package com.ruoyi.business.manage;

import com.ruoyi.business.service.ITaskService;
import com.ruoyi.business.service.impl.TaskServiceImpl;
import com.ruoyi.common.utils.spring.SpringUtils;

import java.util.TimerTask;

public class AsyncFactory {

    public static TimerTask syncData(Long[] ids)
    {
        return new TimerTask()
        {
            @Override
            public void run()
            {
                //获取json文件，判断区域范围，保存区域数据
                ITaskService taskService = SpringUtils.getBean(ITaskService.class);
                taskService.syncData(ids);
            }
        };
    }
}
